package drive.RemakeService.ServiceInterface;

import drive.Model.Article;
import drive.Model.User;
import org.springframework.transaction.annotation.Transactional;

public interface UserProfileService {

    String registerUser(User user);

    String loginUser(String username, String password);

    String loginUserAdmin(String username, String password);

    String updateUserProfile(User user);

    String viewUserCollections(Integer userID,int PageNum,int PageSize);

    String viewUserMessages(Integer userID);



    String followUser(String token, Integer targetUserID);



    String viewUserPublishedArticles(Integer userID, int PageNum, int PageSize);

    String modifyUserPublishedArticle(Article article);

    String getFollowCount(int userId);

    String getFollowingCount(int userId);

    String getUserInfo(int userId);

    String unfollow(int followerId, int followedId);

    String getUserArticleCount(int userId);

    String getArticleStats(int articleId);

    String getUserChatRooms(int userId);

    @Transactional
    String createChatRoom(int user1ID, int user2ID);

    String getFirstMessage(int chatRoomId);

    @Transactional
    String sendMessage(int chatRoomId, int senderId, String content);

    String getChatRoomMessages(int chatRoomId, int pageNum, int pageSize);

    @Transactional
    String markAllMessagesAsRead(int chatRoomId, int userId);

    String getUserSecondHandItems(int userId);

    String getUserDisasters(int userId);

    String viewItemCollections(Integer userID, int PageNum, int PageSize);

    String getFollowedUsersArticles(int userId, int pageNum, int pageSize);

    String getFollowedUsers(int userId, int pageNum, int pageSize);

    String getFollowslist(int userId);
}
